import 'package:flutter_base/generated/json/base/json_field.dart';
import 'package:flutter_base/generated/json/search_hot_key_entity.g.dart';
import 'dart:convert';
export 'package:flutter_base/generated/json/search_hot_key_entity.g.dart';


//搜索热词数组
class SearchHotKeyListData {
	List<SearchHotKeyEntity>? list;

	SearchHotKeyListData.fromJson(dynamic json) {
		list = [];
		if (json is List) {
			for (var element in json) {
				list?.add(SearchHotKeyEntity.fromJson(element));
			}
		}
	}
}

@JsonSerializable()
class SearchHotKeyEntity {
	late int id = 0;
	late String link = '';
	late String name = '';
	late int order = 0;
	late int visible = 0;

	SearchHotKeyEntity();

	factory SearchHotKeyEntity.fromJson(Map<String, dynamic> json) => $SearchHotKeyEntityFromJson(json);

	Map<String, dynamic> toJson() => $SearchHotKeyEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}